package com.whli.jee.system.service;

import com.whli.jee.common.web.service.IBaseService;
import com.whli.jee.system.entity.SysUserRole;
import com.whli.jee.system.vo.SysUserRoleVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 *
 * @author whli
 * @version 1.0
 * @since 1.0
 * */
public interface ISysUserRoleService extends IBaseService<SysUserRole> {

    /**
     * 根据用户查询角色
     * @param userId
     * @return
     */
    List<String> listByUser(String userId);

    /**
     * 给用户授权角色
     * @param entity
     * @return
     */
    @Transactional
    int grant(SysUserRoleVO entity);
}
